package com.oocl.euc.controller;
//package controller;
//
//import java.io.Console;
//
//import javax.servlet.http.HttpServletRequest;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import com.alibaba.fastjson.JSONObject;
//import com.fasterxml.jackson.core.JsonProcessingException;
//
//import entity.Student;
//import service.StudentService;
//import util.JSONUtil;
//
//@Controller
//public class StudentController {
//	@Autowired
//	StudentService ss;
//	@RequestMapping(value="/student",method=RequestMethod.POST)
//	@ResponseBody
//	public String registerStudent(@RequestParam String name,@RequestParam String password,@RequestParam Integer phone,@RequestParam String gender,@RequestParam String remark){
//		 Student s=new Student();
//		 s.setGender(gender);
//		 s.setName(name);
//		 s.setPassword(password);
//		 s.setPhone(phone);
//		 s.setRemark(remark);
//		 ss.registerStudent(s); 
//		 String studentJson="";
//		try {
//			studentJson = JSONUtil.objetc2Json(ss.loginStudent(name, password));
//		} catch (JsonProcessingException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//		 return studentJson;
//	}
//	@RequestMapping(value="/student",method=RequestMethod.GET)
//	@ResponseBody
//	public String loginStudent(String name,String password){
//		String student="";
//		try {
//			student=JSONUtil.objetc2Json(ss.loginStudent(name, password));
//		} catch (JsonProcessingException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//		return student;
//	}
//	@RequestMapping(value="/studentName",method=RequestMethod.GET)
//	@ResponseBody
//	public String avoidDoubleAccount(String name){
//		System.out.println(name);
//		return ss.avoidDoubleName(name);
//	}
//}
